/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package gestion;

import java.util.ArrayList;

/**
 *
 * @author Bart-Home
 */
public class GestionDeplacements {

     private ArrayList<Deplacement> listeDeplacements;


      public GestionDeplacements() {
        listeDeplacements = new ArrayList<Deplacement>();
    }


        public void ajouterDeplacement(Deplacement deplacement){
        listeDeplacements.add(deplacement);
        System.out.println("ajout d'un déplacement");
        AffichageDeplacement();
    }


    public int getSize(){
        return listeDeplacements.size();
    }

    public String getStringSize(){
            return "" + listeDeplacements.size();
    }



    public Deplacement getDeplacement(int i){
        if(!listeDeplacements.isEmpty())
            return listeDeplacements.get(i);
        else return null;

    }

        public void AffichageDeplacement(){
        for (int i=0;i<listeDeplacements.size();i++){
             System.out.println(listeDeplacements.get(i));
            }

    }

}
